package model;/*
 *@创建者 lnn
 *@创建时间2016/8/2922:38
 *@描述 ${TODO}
*/

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

public class BoltHomeModel {

    /**
     * result : 1
     * data : [{"imgUrl":"http://img.shandjj.com/uploads/20160707/577db3e4bc000.jpg","activeUrl":"http://hd.shandjj.com/index.php/CustomerNew/index","type":2,"title":"7.7新客活动","viewType":"1","goods":[],"salePoint":"","linkId":"http://hd.shandjj.com/index.php/CustomerNew/index"},{"imgUrl":"http://img.shandjj.com/uploads/20160828/57c278d32ef7c.jpg","type":3,"title":"2件9折 3件8.5折 Nike&adidas开学特惠专场","viewType":"1","flashDown":"2件9折 3件8.5折","goods":[],"salePoint":"2件9折 3件8.5折","saleTime":"剩3天","linkId":"4568"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c3937c6e430.jpg","type":3,"title":"Supreme男女装服饰特卖专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩4天","linkId":"4596"},{"imgUrl":"http://img.shandjj.com/uploads/20160827/57c10adadac31.jpg","type":3,"title":"BOSS经典商务新款男装专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4563"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57c00ead56c28.jpg","type":3,"title":"LEVIS李维斯牛仔服饰专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4538"},{"title":"女生专场","viewType":"1","imgUrl":"http://img.shandjj.com/uploads/20160520/573eb5e4722d1.jpg","type":7,"linkId":"gender:female"},{"imgUrl":"http://img.shandjj.com/uploads/20160825/57becbf9b96e6.jpg","type":3,"title":"PUMA彪马运动鞋专场","viewType":"1","flashDown":"闪降最高30元","goods":[],"salePoint":"","saleTime":"剩4天","linkId":"4483"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57bf9b59e8901.jpg","type":3,"title":"ARMINI阿玛尼腕表专场","viewType":"1","flashDown":"闪降最高30元","goods":[],"salePoint":"满2件减50","saleTime":"剩3天","linkId":"4484"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c399be41764.jpg","type":3,"title":"大嘴猴秋季上新男女服饰专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩4天","linkId":"4550"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57c0644423319.jpg","type":3,"title":"2件9.5折 3件8.5折 Adidas/三叶草鞋服运动专场","viewType":"1","flashDown":"2件9.5折 3件8.5折","goods":[],"salePoint":"2件9.5折 3件8.5折","saleTime":"剩4天","linkId":"4582"},{"title":"家百专场","viewType":"1","imgUrl":"http://img.shandjj.com/uploads/20160520/573eb6130c294.jpg","type":7,"linkId":"app_style:homeDepartmentStore"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c391584a014.jpg","type":3,"title":"Calvin Klein品牌男装专场【型男】","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"满2件减10元，满3件减20元","saleTime":"剩2天","linkId":"4361"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd3b9253a73.jpg","type":3,"title":"59选2 LBEL男女凉拖清仓专区","viewType":"1","flashDown":"59选2","goods":[],"salePoint":"59选2","saleTime":"剩4天","linkId":"4475"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c3ff560e686.jpg","type":3,"title":"绅贵男装秋装特惠专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"149选2","saleTime":"剩4天","linkId":"4540"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57bfe7b921fc4.jpg","type":3,"title":"ZIPPO品牌专场","viewType":"1","flashDown":"闪降最高30元","goods":[],"salePoint":"2件减5元 ","saleTime":"剩4天","linkId":"4518"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57c0490d76718.jpg","type":3,"title":"全场399元封顶 Adidas/NIKE清仓专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4571"},{"title":"饰品专场","viewType":"1","imgUrl":"http://img.shandjj.com/uploads/20160520/573eb5f92c5eb.jpg","type":7,"linkId":"app_style:ornaments"},{"imgUrl":"http://img.shandjj.com/uploads/20160823/57bc14947cae2.jpg","type":3,"title":"Lee 夏末清仓【型男】","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"2件9折 3件8折","saleTime":"剩11小时","linkId":"4463"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bcf95c7e4c8.jpg","type":3,"title":"鸿星尔克男女休闲鞋专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩4天","linkId":"4470"},{"imgUrl":"http://img.shandjj.com/uploads/20160825/57beb5a2b29fc.jpg","type":3,"title":"范特华特品牌男鞋","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩4天","linkId":"4477"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c3a99333bdc.jpg","type":3,"title":"意大利袋鼠初秋特惠内衣专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩4天","linkId":"4542"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57bff09d3727b.jpg","type":3,"title":"2件9折 费捷罗男鞋专场","viewType":"1","flashDown":"2件9折","goods":[],"salePoint":"2件9折","saleTime":"剩4天","linkId":"4522"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57bfed9c6cb2e.jpg","type":3,"title":"杰威尔型男专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"2件8折","saleTime":"剩4天","linkId":"4524"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57c047ee8194c.jpg","type":3,"title":"杜戛地DZRZVD 运动户外专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩4天","linkId":"4566"},{"title":"化妆品专场","viewType":"1","imgUrl":"http://img.shandjj.com/uploads/20160520/573eb6005fab5.jpg","type":7,"linkId":"app_style:cosmetics"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57bfe8eb6f8ab.jpg","type":3,"title":"紫光数码配件专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"2件减6元","saleTime":"剩4天","linkId":"4084"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57bff955a29b3.jpg","type":3,"title":"Nike男女鞋服新品专场","viewType":"1","flashDown":"闪降最高100元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4534"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c3eb5dda621.jpg","type":3,"title":"GOHOM AY 秋季都市尚品男装专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩4天","linkId":"4621"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c38e0b7b657.jpg","type":3,"title":"岽堂禾秋上新裤装","viewType":"1","flashDown":"闪降最高50元","goods":[],"salePoint":"2件减10元","saleTime":"剩3天","linkId":"4583"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57c013982c30a.jpg","type":3,"title":"战地吉普秋季上新第一场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4564"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd0ac89c7db.jpg","type":3,"title":"雷诺斯 时尚运动特惠专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4437"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bcf1d0283df.jpg","type":3,"title":"欧巴伦 男鞋专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4442"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57c00be7151b3.jpg","type":3,"title":"SKG小家电专场","viewType":"1","flashDown":"闪降最高30元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4556"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd16031f34d.jpg","type":3,"title":"NABOWAN纳博万男包专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4261"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57bff7807c8fb.jpg","type":3,"title":"艾弗森 秋季运动鞋","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4536"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c38953abc48.jpg","type":3,"title":"AMH秋装新款特卖专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4567"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bcff4f33de0.jpg","type":3,"title":"百事pepsi男女运动服饰专场","viewType":"1","flashDown":"闪降最高10元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4472"},{"imgUrl":"http://img.shandjj.com/uploads/20160825/57be488d8f4b9.jpg","type":3,"title":"瑞士军刀品牌男鞋专场","viewType":"1","flashDown":"闪降最高30元","goods":[],"salePoint":"","saleTime":"剩3天","linkId":"4494"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd5d9060552.jpg","type":3,"title":"3件7折 瑞士军刀SWISSGEAR箱包专场","viewType":"1","flashDown":"2件9折 3件7折","goods":[],"salePoint":"2件9折 3件7折","saleTime":"剩3天","linkId":"4217"},{"imgUrl":"http://img.shandjj.com/uploads/20160823/57bc18570cc59.jpg","type":3,"title":"2件9.5折 CLARKS其乐 轻奢鞋履专场","viewType":"1","flashDown":"2件9.5折","goods":[],"salePoint":"2件9.5折","saleTime":"剩2天","linkId":"4462"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd63171e52b.jpg","type":3,"title":"美国alenqueena智能穿戴专场","viewType":"1","flashDown":"闪降最高30元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4489"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c395303edd9.jpg","type":3,"title":"杰克琼斯＆斯莱德特卖专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩19小时","linkId":"4454"},{"imgUrl":"http://img.shandjj.com/uploads/20160825/57beaf750bfe7.jpg","type":3,"title":"VANS潮流休闲鞋专场","viewType":"1","flashDown":"闪降最高30元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4523"},{"imgUrl":"http://img.shandjj.com/uploads/20160827/57c06cd3d2e79.jpg","type":3,"title":"U.S. POLO ASSN.男女内衣专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4097"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd358d52f00.jpg","type":3,"title":"ASICS/亚瑟士运动鞋专场","viewType":"1","flashDown":"闪降最高50元","goods":[],"salePoint":"","saleTime":"剩11小时","linkId":"4416"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57c01fc8488cc.jpg","type":3,"title":"LACOSTE秋冬上新专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩11小时","linkId":"4451"},{"imgUrl":"http://img.shandjj.com/uploads/20160825/57be5d9caf737.jpg","type":3,"title":"Adidas阿迪达斯男女鞋服新品专场","viewType":"1","flashDown":"闪降最高30元","goods":[],"salePoint":"","saleTime":"剩11小时","linkId":"4497"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57bfedf1e96a0.jpg","type":3,"title":"2件9折 美洲野牛品牌箱包专场","viewType":"1","flashDown":"2件9折","goods":[],"salePoint":"2件9折","saleTime":"剩2天","linkId":"4521"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c394a0251af.jpg","type":3,"title":"浮士绘男装秋季卫衣专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4510"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bcfab564ea2.jpg","type":3,"title":"Calvin Klein腕表专场","viewType":"1","flashDown":"闪降最高30元","goods":[],"salePoint":"","saleTime":"剩11小时","linkId":"4221"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57c004d841ea0.jpg","type":3,"title":"日本人气单品专场","viewType":"1","flashDown":"闪降最高10元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4553"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c39005cbf27.jpg","type":3,"title":"eef男装秋换新专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4481"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c38c44591d3.jpg","type":3,"title":"viishow男装秋上新专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4527"},{"imgUrl":"http://img.shandjj.com/uploads/20160825/57beae6391687.jpg","type":3,"title":"浅休 睡衣家居服专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4498"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd07eb7779d.jpg","type":3,"title":"歆尼娅男女运动内衣大促专场","viewType":"1","flashDown":"闪降最高10元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4453"},{"imgUrl":"http://img.shandjj.com/uploads/20160825/57becd8e3890b.jpg","type":3,"title":"2件减20元 花花公子鞋品秋季上新","viewType":"1","flashDown":"2件减20元","goods":[],"salePoint":"2件减20元","saleTime":"剩2天","linkId":"4387"},{"imgUrl":"http://img.shandjj.com/uploads/20160825/57bead96e3986.jpg","type":3,"title":"领舞者男女休闲运动专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4509"},{"imgUrl":"http://img.shandjj.com/uploads/20160823/57bbc7c6b73f4.jpg","type":3,"title":"乔丹 男女休闲鞋专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4431"},{"imgUrl":"http://img.shandjj.com/uploads/20160823/57bbbeb8069fa.jpg","type":3,"title":"2件9折 圣大保罗男鞋专场","viewType":"1","flashDown":"2件9折","goods":[],"salePoint":"2件9折 ","saleTime":"剩19小时","linkId":"4397"},{"imgUrl":"http://img.shandjj.com/uploads/20160823/57bba72a605ab.jpg","type":3,"title":"CRYSTAL水晶运动室内健身专场","viewType":"1","flashDown":"闪降最高100元","goods":[],"salePoint":"","saleTime":"剩19小时","linkId":"4377"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd100b4e756.jpg","type":3,"title":"哥斯兰顿 秋季上新专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩2天","linkId":"4419"},{"imgUrl":"http://img.shandjj.com/uploads/20160829/57c38f916f3a0.jpg","type":3,"title":"吉普战车 秋装上新专场","viewType":"1","flashDown":"闪降最高优惠20元","goods":[],"salePoint":"","saleTime":"剩11小时","linkId":"4532"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd016f07e44.jpg","type":3,"title":"Dteens苹果配件专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩19小时","linkId":"4408"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd03d0d1e6f.jpg","type":3,"title":"森列夫时尚男鞋专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩11小时","linkId":"4440"},{"imgUrl":"http://img.shandjj.com/uploads/20160823/57bbc6a44c41e.jpg","type":3,"title":"361° 休闲特惠专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩19小时","linkId":"4432"},{"imgUrl":"http://img.shandjj.com/uploads/20160826/57c017aeafe32.jpg","type":3,"title":"恒源祥日常服饰专区","viewType":"1","flashDown":"闪降最高优惠30元","goods":[],"salePoint":"","saleTime":"剩11小时","linkId":"4495"},{"imgUrl":"http://img.shandjj.com/uploads/20160825/57be867597f3f.jpg","type":3,"title":"Aisaly品牌内衣专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩19小时","linkId":"4425"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd58d468dee.jpg","type":3,"title":"CLUBNEWS夏季清仓品牌专场","viewType":"1","flashDown":"闪降最高20元","goods":[],"salePoint":"","saleTime":"剩11小时","linkId":"4476"},{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd0c121c8d9.jpg","type":3,"title":"2件减5元 3件减10元 每度新款牛皮男士专区","viewType":"1","flashDown":"2件减5元 3件减10元","goods":[],"salePoint":"2件减5元 3件减10元","saleTime":"剩11小时","linkId":"4385"}]
     * catTypes : [{"catId":"2","catName":"运动","fontColor":"#99c832","icon":null,"pressIcon":null,"type":0},{"catId":"3","catName":"服饰","fontColor":"#89abda","icon":null,"pressIcon":null,"type":0},{"catId":"4","catName":"美妆","fontColor":"#ef65a3","icon":null,"pressIcon":"","type":0},{"catId":"8","catName":"更多","fontColor":"#f9962b","icon":null,"pressIcon":null,"type":0},{"catId":"5","catName":"鞋包","fontColor":"#f9962b","icon":"","pressIcon":"","type":0}]
     * banners : []
     * templates : [{"title":"","tType":0,"item":[{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a3b98c23.png","type":"6","name":"运动","link":"2","wh":"150:180"},{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a43daebf.png","type":"6","name":"服饰","link":"3","wh":"150:180"},{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a4927b7a.png","type":"6","name":"鞋包","link":"5","wh":"150:180"},{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a4fa5875.png","type":"6","name":"美妆","link":"4","wh":"150:180"},{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a555d1ef.png","type":"6","name":"更多","link":"8","wh":"150:180"}]},{"title":"","tType":2,"item":[{"imgUrl":"http://img.shandjj.com/uploads/20160824/57bd6aaa15f5f.png","type":"2","name":"","link":"http://m.shandjj.com/index.php/Activity/activity_ms","wh":"249:429"},{"imgUrl":"http://img.shandjj.com/uploads/20160811/57ac4a8c3d4b6.png","type":"2","name":"","link":"http://m.shandjj.com/index.php/BargainGoods/index","wh":"501:224"},{"imgUrl":"http://img.shandjj.com/uploads/20160726/57971de65f9da.png","type":"2","name":"","link":"http://hd.shandjj.com/index.php/Preheat/index","wh":"251:205"},{"imgUrl":"http://img.shandjj.com/uploads/20160816/57b2d50bf3751.png","type":"2","name":"","link":"http://m.shandjj.com/index.php/Activity/snatch","wh":"250:205"}]},{"title":"","tType":0,"item":[{"imgUrl":"http://img.shandjj.com/uploads/20160520/573e896dd0262.jpg","type":"5","name":"","link":"","wh":"720:104"}]}]
     * sex : 0
     */

    private int result;
    private int sex;
    /**
     * imgUrl : http://img.shandjj.com/uploads/20160707/577db3e4bc000.jpg
     * activeUrl : http://hd.shandjj.com/index.php/CustomerNew/index
     * type : 2
     * title : 7.7新客活动
     * viewType : 1
     * goods : []
     * salePoint :
     * linkId : http://hd.shandjj.com/index.php/CustomerNew/index
     */

    private List<DataBean> data;
    /**
     * catId : 2
     * catName : 运动
     * fontColor : #99c832
     * icon : null
     * pressIcon : null
     * type : 0
     */

    private List<CatTypesBean> catTypes;
    private List<?> banners;
    /**
     * title :
     * tType : 0
     * item : [{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a3b98c23.png","type":"6","name":"运动","link":"2","wh":"150:180"},{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a43daebf.png","type":"6","name":"服饰","link":"3","wh":"150:180"},{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a4927b7a.png","type":"6","name":"鞋包","link":"5","wh":"150:180"},{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a4fa5875.png","type":"6","name":"美妆","link":"4","wh":"150:180"},{"imgUrl":"http://img.shandjj.com/uploads/20160329/56fa4a555d1ef.png","type":"6","name":"更多","link":"8","wh":"150:180"}]
     */

    private List<TemplatesBean> templates;

    public static BoltHomeModel objectFromData(String str) {

        return new Gson().fromJson(str, BoltHomeModel.class);
    }

    public static BoltHomeModel objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), BoltHomeModel.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public static List<BoltHomeModel> arrayBoltHomeModelFromData(String str) {

        Type listType = new TypeToken<ArrayList<BoltHomeModel>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public static List<BoltHomeModel> arrayBoltHomeModelFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);
            Type listType = new TypeToken<ArrayList<BoltHomeModel>>() {
            }.getType();

            return new Gson().fromJson(jsonObject.getString(str), listType);

        } catch (JSONException e) {
            e.printStackTrace();
        }

        return new ArrayList();


    }

    public int getResult() {
        return result;
    }

    public void setResult(int result) {
        this.result = result;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public List<CatTypesBean> getCatTypes() {
        return catTypes;
    }

    public void setCatTypes(List<CatTypesBean> catTypes) {
        this.catTypes = catTypes;
    }

    public List<?> getBanners() {
        return banners;
    }

    public void setBanners(List<?> banners) {
        this.banners = banners;
    }

    public List<TemplatesBean> getTemplates() {
        return templates;
    }

    public void setTemplates(List<TemplatesBean> templates) {
        this.templates = templates;
    }

    public static class DataBean {
        private String imgUrl;
        private String activeUrl;
        private int type;
        private String title;
        private String viewType;
        private String salePoint;
        private String linkId;
        private List<?> goods;

        public static DataBean objectFromData(String str) {

            return new Gson().fromJson(str, DataBean.class);
        }

        public static DataBean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), DataBean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public static List<DataBean> arrayDataBeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<DataBean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public static List<DataBean> arrayDataBeanFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);
                Type listType = new TypeToken<ArrayList<DataBean>>() {
                }.getType();

                return new Gson().fromJson(jsonObject.getString(str), listType);

            } catch (JSONException e) {
                e.printStackTrace();
            }

            return new ArrayList();


        }

        public String getImgUrl() {
            return imgUrl;
        }

        public void setImgUrl(String imgUrl) {
            this.imgUrl = imgUrl;
        }

        public String getActiveUrl() {
            return activeUrl;
        }

        public void setActiveUrl(String activeUrl) {
            this.activeUrl = activeUrl;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getViewType() {
            return viewType;
        }

        public void setViewType(String viewType) {
            this.viewType = viewType;
        }

        public String getSalePoint() {
            return salePoint;
        }

        public void setSalePoint(String salePoint) {
            this.salePoint = salePoint;
        }

        public String getLinkId() {
            return linkId;
        }

        public void setLinkId(String linkId) {
            this.linkId = linkId;
        }

        public List<?> getGoods() {
            return goods;
        }

        public void setGoods(List<?> goods) {
            this.goods = goods;
        }
    }

    public static class CatTypesBean {
        private int catId;
        private String catName;
        private String fontColor;
        private Object icon;
        private Object pressIcon;
        private int type;

        public static CatTypesBean objectFromData(String str) {

            return new Gson().fromJson(str, CatTypesBean.class);
        }

        public static CatTypesBean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), CatTypesBean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public static List<CatTypesBean> arrayCatTypesBeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<CatTypesBean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public static List<CatTypesBean> arrayCatTypesBeanFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);
                Type listType = new TypeToken<ArrayList<CatTypesBean>>() {
                }.getType();

                return new Gson().fromJson(jsonObject.getString(str), listType);

            } catch (JSONException e) {
                e.printStackTrace();
            }

            return new ArrayList();


        }

        public int getCatId() {
            return catId;
        }

        public void setCatId(int catId) {
            this.catId = catId;
        }

        public String getCatName() {
            return catName;
        }

        public void setCatName(String catName) {
            this.catName = catName;
        }

        public String getFontColor() {
            return fontColor;
        }

        public void setFontColor(String fontColor) {
            this.fontColor = fontColor;
        }

        public Object getIcon() {
            return icon;
        }

        public void setIcon(Object icon) {
            this.icon = icon;
        }

        public Object getPressIcon() {
            return pressIcon;
        }

        public void setPressIcon(Object pressIcon) {
            this.pressIcon = pressIcon;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }
    }

    public static class TemplatesBean {
        private String title;
        private int tType;
        /**
         * imgUrl : http://img.shandjj.com/uploads/20160329/56fa4a3b98c23.png
         * type : 6
         * name : 运动
         * link : 2
         * wh : 150:180
         */

        private List<ItemBean> item;

        public static TemplatesBean objectFromData(String str) {

            return new Gson().fromJson(str, TemplatesBean.class);
        }

        public static TemplatesBean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), TemplatesBean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public static List<TemplatesBean> arrayTemplatesBeanFromData(String str) {

            Type listType = new TypeToken<ArrayList<TemplatesBean>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public static List<TemplatesBean> arrayTemplatesBeanFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);
                Type listType = new TypeToken<ArrayList<TemplatesBean>>() {
                }.getType();

                return new Gson().fromJson(jsonObject.getString(str), listType);

            } catch (JSONException e) {
                e.printStackTrace();
            }

            return new ArrayList();


        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public int getTType() {
            return tType;
        }

        public void setTType(int tType) {
            this.tType = tType;
        }

        public List<ItemBean> getItem() {
            return item;
        }

        public void setItem(List<ItemBean> item) {
            this.item = item;
        }

        public static class ItemBean {
            private String imgUrl;
            private String type;
            private String name;
            private String link;
            private String wh;

            public static ItemBean objectFromData(String str) {

                return new Gson().fromJson(str, ItemBean.class);
            }

            public static ItemBean objectFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);

                    return new Gson().fromJson(jsonObject.getString(str), ItemBean.class);
                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return null;
            }

            public static List<ItemBean> arrayItemBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<ItemBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public static List<ItemBean> arrayItemBeanFromData(String str, String key) {

                try {
                    JSONObject jsonObject = new JSONObject(str);
                    Type listType = new TypeToken<ArrayList<ItemBean>>() {
                    }.getType();

                    return new Gson().fromJson(jsonObject.getString(str), listType);

                } catch (JSONException e) {
                    e.printStackTrace();
                }

                return new ArrayList();


            }

            public String getImgUrl() {
                return imgUrl;
            }

            public void setImgUrl(String imgUrl) {
                this.imgUrl = imgUrl;
            }

            public String getType() {
                return type;
            }

            public void setType(String type) {
                this.type = type;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getLink() {
                return link;
            }

            public void setLink(String link) {
                this.link = link;
            }

            public String getWh() {
                return wh;
            }

            public void setWh(String wh) {
                this.wh = wh;
            }
        }
    }
}
